package com.mcp.server.model;

import lombok.Data;

/**
 * MCP错误对象
 */
@Data
public class McpError {
    private int code;       // 错误码
    private String message; // 错误信息
    private Object data;    // 附加数据
    
    // 预定义错误码
    public static final int PARSE_ERROR = -32700;
    public static final int INVALID_REQUEST = -32600;
    public static final int METHOD_NOT_FOUND = -32601;
    public static final int INVALID_PARAMS = -32602;
    public static final int INTERNAL_ERROR = -32603;

    public McpError(int code, String message, Object data) {}

    public McpError(Object data, String message, int code) {
        this.data = data;
        this.message = message;
        this.code = code;
    }
}